import Layout from '@/layout/LayoutIndex.vue'
const route = [
  {
    path: '/system',
    component: Layout,
    name: 'system',
    redirect: '/404',
    meta: { title: '系统目录' },
    children: [
      {
        path: '/401',
        name: '401',
        component: () => import('@/views/system/401.vue'),
        meta: { title: '401', cache: false },
      },
      {
        path: '/redirect/:path(.*)',
        name: 'redirect',
        component: () => import('@/views/system/redirect.vue'),
        meta: { title: 'redirect', cache: false },
      },
    ],
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/system/login.vue'),
    meta: { title: '登录', cache: false },
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/system/404.vue'),
    meta: { title: '404', cache: false },
  },
  {
    // 找不到路由重定向到404页面
    path: '/:pathMatch(.*)',
    name: 'pathMatch',
    component: Layout,
    redirect: '/404',
  },
]

export default route
